<template>
  <div class="home">
 
 <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white" >
  <van-swipe-item v-for="(item, index) in lunlist" :key="index">
    <img v-lazy="item.img" class="img" />
  </van-swipe-item>

 
</van-swipe>
<div class="shang">
  <div class="tu">
     <router-link to="/layout/myxinwen" class="user">
    <img src="../images/menu3.png" alt="" class="img">
      <p>新闻资讯</p>
    </router-link>
  </div>
   <div class="tu">
     <router-link to="/layout/mytupian" class="user">
    <img src="../images/menu4.png" alt="" class="img">
    <p>图片分享</p>
    </router-link>
  </div>
   <div class="tu">
     <router-link to="/layout/myshangpin" class="user">
    <img src="../images/menu5.png" alt="" class="img">
    <p>商品展示</p>
    </router-link>
  </div>
  <div class="tu">
    <img src="../images/menu6.png" alt="" class="img">
    <p>留言反馈</p>
  </div>
   <div class="tu">
    <img src="../images/menu9.png" alt="" class="img">
    <p>搜索资讯</p>
  </div>
   <div class="tu">
    <img src="../images/menu10.png" alt="" class="img">
    <p>联系我们</p>
  </div>
  
  
</div>


  </div>

  
</template>

<script>

import {getSwipeData, getPageTextData} from '@/apis/api'
export default {
  data () {
    return {
      lunlist:[],
      lunlist:[
        {

        }
        ]
      
    }
  },
  async created () {
    const res = await getSwipeData()
    console.log(res);
    this.lunlist = res.message
    const res2 = await getPageTextData()
    console.log(res2);

  }
}
</script>
<style lang="less" scoped>
.home{
  .shang{
    display: flex;
    // flex-direction: column;
    flex-wrap: wrap;
    margin-top: 45px;
    .tu{
      width: 33%;
      .img{
        width: 70%;
        
      }
    }
   
    
  }
  

    .my-swipe .van-swipe-item {
    color: #fff;
    font-size: 20px;
    line-height: 150px;
    text-align: center;
    background-color: #39a9ed;
    height: 200px;
    margin-top: 10px;
    .img{
      width: 100%;
      height: 100%;
    }
  }
}
</style>
